/*
 * @Author: WangGuojian 1085844536@qq.com
 * @Date: 2023-12-13 22:19:14
 * @LastEditTime: 2023-12-13 23:00:28
 * @LastEditors: WangGuojian 1085844536@qq.com
 * @FilePath: \HelloWorldd:\Developer\WGJ\VSCode_WorkSpace\Cpp\c-learning\code\control\switch.c
 * @Description:
 */
#include <stdio.h>
#include <stdlib.h>

int main()
{

    int ch;

    ch = getchar();

    switch (ch)
    {
    case 'a' || 'A':
    case 'A':
        printf("Ant:a small insect that lives in group!\n");
    case 'b':
    case 'B':
        printf("Butterfly: a flying insect with a long thin body!\n");
    case 'c':
    case 'C':
        printf("Cobra:A highly dangerous snake!\n");
    case 'd':
    case 'D':
        printf("Donkey:A animal with short legs and long ears!\n");
    default:
        break;
    }

#if 0
    int score;

    printf("Please enter:");
    scanf("%d", &score);

    if (score > 100 || score < 0)
    {
        fprintf(stderr, "EINVAL\n");
        exit(1);
    }

    switch (score / 10)
    {
    case 10:
    case 9:
        puts("A");
        break;
    case 8:
        puts("B");
        break;
    case 7:
        puts("C");
        break;
    case 6:
        puts("D");
        break;
    case 5:
    case 4:
    case 3:
    case 2:
    case 1:
    case 0:
        puts("E");
        break;
    default:
        break;
    }

    exit(0);
#endif
}